//
//  HAOrderFinishTableViewCell.m
//  HorsemanApp
//
//  Created by qyc on 2019/7/28.
//  Copyright © 2019 q. All rights reserved.
//

#import "HAOrderFinishTableViewCell.h"

@implementation HAOrderFinishTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)createCellDataWithModel:(HAOrderModel *)model {
    self.time.text = [NSString stringWithFormat:@"送达时间：%@",model.shipping_time];
    self.adress.text = model.address_data.name;
    self.num.text = [NSString stringWithFormat:@"订单号：%@",model.order_sn];
    
    // 状态
    switch (model.order_status) {
        case UserOrdersProductTypeWithReturnGoodPut:
        case UserOrdersProductTypeWithRefund:
        case UserOrdersProductTypeWithUserCancalApply:
        case UserOrdersProductTypeWithMagageTurn:
        case UserOrdersProductTypeWithReturnSuccess:
        case UserOrdersProductTypeWithReturnSuccessAndEvaluate:
            self.typeLabel.text = @"退货单";
            break;
        case UserOrdersProductTypeWithDistributionSuccess:
        case UserOrdersProductTypeWithDistributionSuccessAndEvaluate:
        case UserOrdersProductTypeWithReturnApply:
        case UserOrdersProductTypeWithReturnApplyMoneySuccess:
        case UserOrdersProductTypeWithExchangeSuccess:
            self.typeLabel.text = @"新订单";
            break;
        default:
            break;
    }
}
@end
